3.86 \(\int \csc ^2(c+d x) (a+b \tan (c+d x))^n \, dx\)

Optimal. Leaf size=48 \[ \frac{b (a+b \tan (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac{b \tan (c+d x)}{a}+1\right )}{a^2 d (n+1)} \]

[Out]

(b*Hypergeometric2F1[2, 1 + n, 2 + n, 1 + (b*Tan[c + d*x])/a]*(a + b*Tan[c + d*x])^(1 + n))/(a^2*d*(1 + n))

________________________________________________________________________________________

Rubi [A]  time = 0.0548995, antiderivative size = 48, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3516, 65} \[ \frac{b (a+b \tan (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac{b \tan (c+d x)}{a}+1\right )}{a^2 d (n+1)} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^2*(a + b*Tan[c + d*x])^n,x]

[Out]

(b*Hypergeometric2F1[2, 1 + n, 2 + n, 1 + (b*Tan[c + d*x])/a]*(a + b*Tan[c + d*x])^(1 + n))/(a^2*d*(1 + n))

Rule 3516

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[b/f, Subst[Int
[(x^m*(a + x)^n)/(b^2 + x^2)^(m/2 + 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/
2]

Rule 65

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)*Hypergeometric2F1[-m, n +
 1, n + 2, 1 + (d*x)/c])/(d*(n + 1)*(-(d/(b*c)))^m), x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Inte
gerQ[m] || GtQ[-(d/(b*c)), 0])

Rubi steps

\begin{align*} \int \csc ^2(c+d x) (a+b \tan (c+d x))^n \, dx &=\frac{b \operatorname{Subst}\left (\int \frac{(a+x)^n}{x^2} \, dx,x,b \tan (c+d x)\right )}{d}\\ &=\frac{b \, _2F_1\left (2,1+n;2+n;1+\frac{b \tan (c+d x)}{a}\right ) (a+b \tan (c+d x))^{1+n}}{a^2 d (1+n)}\\ \end{align*}

Mathematica [A]  time = 0.875393, size = 48, normalized size = 1. \[ \frac{b (a+b \tan (c+d x))^{n+1} \, _2F_1\left (2,n+1;n+2;\frac{b \tan (c+d x)}{a}+1\right )}{a^2 d (n+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^2*(a + b*Tan[c + d*x])^n,x]

[Out]

(b*Hypergeometric2F1[2, 1 + n, 2 + n, 1 + (b*Tan[c + d*x])/a]*(a + b*Tan[c + d*x])^(1 + n))/(a^2*d*(1 + n))

________________________________________________________________________________________

Maple [F]  time = 0.239, size = 0, normalized size = 0. \begin{align*} \int \left ( \csc \left ( dx+c \right ) \right ) ^{2} \left ( a+b\tan \left ( dx+c \right ) \right ) ^{n}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^2*(a+b*tan(d*x+c))^n,x)

[Out]

int(csc(d*x+c)^2*(a+b*tan(d*x+c))^n,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \tan \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*tan(d*x+c))^n,x, algorithm="maxima")

[Out]

integrate((b*tan(d*x + c) + a)^n*csc(d*x + c)^2, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (b \tan \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*tan(d*x+c))^n,x, algorithm="fricas")

[Out]

integral((b*tan(d*x + c) + a)^n*csc(d*x + c)^2, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**2*(a+b*tan(d*x+c))**n,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \tan \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+b*tan(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((b*tan(d*x + c) + a)^n*csc(d*x + c)^2, x)